package HomeWork;

import java.util.*;

/**
 * @description:
 * @Author yyp
 * @time 2022/3/25
 */
public class HomeWork03 {
    public static void main(String[] args) {
        Map<String,Integer> map = new HashMap<>();
        map.put("a",1000);
        map.put("b",200);
        map.replace("a",300);
        System.out.println(map);
        Set keys = map.keySet();
        for (Object key : keys) {
            map.replace((String) key,map.get(key)+100);
        }
        for (Object key : keys) {
            System.out.println(key);
        }
        System.out.println(map);
        Collection collection = map.values();
        for (Object o : collection) {
            System.out.println(o);
        }

    }
}
